/*
 * Copyright (C) 2009 M. Hautle.
 * 
 * This file is part of TrackedBean.
 * 
 * TrackedBean is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * TrackedBean is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License along with TrackedBean. If not, see <http://www.gnu.org/licenses/>.
 */
package ch.trackedbean.tracking.internal.injection;

import ch.trackedbean.tracking.injection.*;

/**
 * Object holding general informations about a class
 * 
 * @author M. Hautle
 */
public class ClassInformation implements IClassInformation {
    /** The name of this class */
    public String internalName;

    /** The name of the super class */
    public String parentName;

    /** If this class implement {@link java.io.Serializable} */
    public boolean serializable;

    /** If this class implements the marker interface and has to be tracked */
    public boolean tracked;

    /** If a parent implements implements the marker interface */
    public boolean parentTracked;

    /**
     * Init constructor.
     * 
     * @param internalName The internal name
     * @param parentName The parent name or null
     * @param serializable True if serializable
     * @param tracked True if tracked
     * @param parentTracked True if the parent is tracked
     */
    public ClassInformation(String internalName, String parentName, boolean serializable, boolean tracked, boolean parentTracked) {
        this.internalName = internalName;
        this.parentName = parentName;
        this.serializable = serializable;
        this.tracked = tracked;
        this.parentTracked = parentTracked;
    }

    /**
     * Default constructor.
     */
    public ClassInformation() {
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isSerializable() {
        return serializable;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isTracked() {
        return tracked;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isParentTracked() {
        return parentTracked;
    }
}
